"""
第一题
"""
num1 = 1
num2 = 0
while num1 <= 100:
    if num1 % 3 == 0 and num1 % 5 == 0:
        num2 += num1
    num1 += 1
print(num2)

"""
第二题
"""
age = 2000
while age <= 2100:
    if age % 400 == 0 or (age % 4 == 0 and age % 100 != 0):
        print(age)
    age += 1

"""
第三题
"""
for i in range(1, 6):
    print('*' * i)
i = '*'
for j in range(5):
    print(i + '**' * j)

"""
第四题
"""
for i in range(1, 10):
    for j in range(1, i+1):
        print('%s * %s = %s\t' % (i, j, i * j), end='')
    print()

i = 1
while i <= 9:
    j = 1
    while j <= i:
        print('%s * %s = %s\t' % (i, j, i * j), end='')
        j += 1
    print()
    i += 1


"""
第六题
"""
name = "posekakaka"
print(name.strip())
print(name.startswith('po'))
print(name.endswith('a'))
print(name.replace('k', 'c'))
print(name.split('k'))


"""
第七题
"""
while True:
    username = input("请输入用户名：")
    password = input("请输入密码：")
    if username == 'admin' and password == '123456':
        print('登陆成功')
        break
    elif username == 'exit':
        break
    else:
        print('用户名或密码错误！')
